package com.collection;

import java.util.*;

/**
 * @Author WaveHi
 * @Date 13/8/2021 上午 11:31
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description Collection类的使用
 */
public class TestCollection {

    public static void main(String[] args) {

        //测试Collection接口
        Collection coll = null;

        //测试List接口
        List l1 = null;

        //测试List的实现类
        //AbstractCollection
        AbstractCollection abstractCollection = null;

        //测试ArrayList类
        ArrayList<Person> persons = new ArrayList<>();

        //测试AbstractList抽象类
        AbstractList abstractList = null;//抽象类不可被实例化

        //Vector类
        Vector<Person> persons2 = new Vector<>();

        //测试LinkedList类
        LinkedList<Person> person3 = new LinkedList<>();

        //测试AbstractSequentialList抽象类
        AbstractSequentialList<Person> person4 = null;

        //测试Set接口
        Set s1 = null;

        //测试Set接口的实现类
        //测试HashSet类
        HashSet<Person> people1 = new HashSet<>();

        //测试AbstractSet抽象类
        AbstractSet as = null;

        //测试HashSet的子类LinkedHashSet
        LinkedHashSet lhs = new LinkedHashSet();

        //测试TreeSet类
        TreeSet ts = new TreeSet();




    }

}
